首页
<template>
    <div class="main">
        <el-card class="box-card">
         <el-row> 
             <el-col :span="5">数据库</el-col>
             <el-col :span="1">:</el-col>
             <el-col :span="10">运行时间{{runtime.db_runtime}}</el-col>
             <el-col :span="8">
                 <el-button type="primary" plain>重启</el-button>
             </el-col>
         </el-row>
         <el-row> 
             <el-col :span="5">服务程序</el-col>
             <el-col :span="1">:</el-col>
             <el-col :span="10">运行时间{{runtime.service}}</el-col>
             <el-col :span="8">
                 <el-button type="primary" plain>重启</el-button>
             </el-col>
         </el-row>
         <el-row> 
             <el-col :span="5">Web服务器</el-col>
             <el-col :span="1">:</el-col>
             <el-col :span="10">运行时间{{runtime.server_runtime}}</el-col>
             <el-col :span="8">
                 <el-button type="primary" plain>重启</el-button>
             </el-col>
         </el-row>
         <el-row> 
             <el-col :span="5">操作系统</el-col>
             <el-col :span="1">:</el-col>
             <el-col :span="10">运行时间{{runtime.system_time}}</el-col>
             <el-col :span="8">
                 <el-button type="primary" plain>重启</el-button>
             </el-col>
         </el-row>
        </el-card>
</div>
</template>

<script>
import axios from '../plugins/axios'  //在哪里用就在哪里引入
// require('@/mock/runtime.js')
export default {
    data(){
        return{
           runtime:{},
        }
    },
    methods: {
      load () {
        
      }
    },
     created:function(){
        axios.get('/action/runtime')
        .then(response=>{
           // console.log(response);
            this.runtime=response.data.runtime;
            //console.log(this.system_info);
        })
        .catch(error=>{
           console.log(error);
        //    alert('网络错误');
        })
},
}
</script>

<style scoped>
.main{
    font-size: 30px;
}
.el-card{
    position:absolute;
    left: 14.5%;
    width: 82%;
    top:14.97%;
    padding: 3px;
    margin: 0px;
    height: 81%;
    font-size: 20px;
}
.el-row{
    padding: 2px;
    margin: 20px;
    border: 1px solid rgb(154, 154, 223);
}

</style>
